package lab02.test06;

public class Ladder {
    double upperbase;
    double bottom;
    double height;
    double area;
    Ladder(double upperbase,double bottom,double height,
           double area){
        this.upperbase = upperbase;
        this.bottom = bottom;
        this.height = height;

    }
    double area(){
        area = (upperbase + bottom)*height/2;
        System.out.println("面积是：" + area);
        return area;
    }
    }



